AssetWise CONNECT Edition Implementation Guide

Potential Errors Running the PowerShell Script

The following table describes common issues that may occur when running the PowerShell EC schema generation script, and recommended solutions.

Issue Solution
Connecting to remote server failed with the following error message : "The WinRM client cannot process the request. If the authentication scheme is different from Kerberos, or if the client computer is not joined to a domain, then HTTPS transport must be used or the destination machine must be added to the TrustedHosts configuration setting. Use winrm.cmd to configure TrustedHosts. Note that computers in the TrustedHosts list might not be authenticated." Enter the server's IP address in the MachineName value in the settings.xml settings file.
The following error message appears: "… cannot be loaded because the execution of scripts is disabled on this system. " Execute the following from the PowerShell command prompt and say Yes to the prompt: Set-ExecutionPolicy RemoteSigned
The following error message appears: "Could not load file or assembly 'file:///C:\Program Files\Bentley\eB\Server\eB.Common.dll' or one of its dependencies. This assembly is built by a runtime newer than the currently loaded runtime and cannot be loaded."

PowerShell is not configured to run with .NET 4.x. The PowerShell config file must be updated.

<?xml version="1.0"?> 
				   <configuration> 
				      <startup
					 useLegacyV2RuntimeActivationPolicy="true"> 
				         <supportedRuntime
					 version="v4.0.30319"/> 
				         <supportedRuntime
					 version="v2.0.50727"/> 
				      </startup> 
				   </configuration>

See: http://viziblr.com/news/2012/5/16/the-easy-way-to-run-powershell-20-using-net-framework-40.html